package com.zc.demo.di;

import com.zc.demo.di.interfaces.Instrument;
import com.zc.demo.di.interfaces.Performer;

/**
 * Created by zhangchi9 on 2016/11/2.
 */
public class Instrumentalist implements Performer{
    @Override
    public void perform() {
        System.out.println("Playing "+song+":");
        instrument.play();
    }

    private String song;//歌曲
    private int age;//年龄
    private Instrument instrument;//乐器接口

    public String getSong() {
        return song;
    }

    public void setSong(String song) {
        this.song = song;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Instrument getInstrument() {
        return instrument;
    }

    public void setInstrument(Instrument instrument) {
        this.instrument = instrument;
    }
}
